<template>
    <div>
      <el-container>
        <el-header><headers></headers></el-header>
        <el-container>
          <el-aside width="150px">
            <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
              <el-submenu index="1">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>新闻资讯</span>
                </template>
                <el-menu-item>
                  <router-link to="/manageNews">管理资讯</router-link>
                </el-menu-item>
                <el-menu-item >
                  <router-link to="/addNews">新增喜讯</router-link>
                </el-menu-item>
              </el-submenu>
              <el-submenu index="2">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>加入我们</span>
                </template>
                <el-menu-item index="2-1">
                  <router-link to="/manageDetail">管理信息</router-link>
                </el-menu-item>
                <el-menu-item index="2-2">
                  <router-link to="/addJob">新增招聘</router-link>
                </el-menu-item>
              </el-submenu>
              <el-submenu index="3">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>官网配置</span>
                </template>
                <el-menu-item index="3-1">
                  <router-link to="/setting">配置管理</router-link>
                </el-menu-item>
              </el-submenu>
              <el-submenu index="4">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>历程管理</span>
                </template>
                <el-menu-item index="4-1">
                  <router-link to="/history">历程信息</router-link>
                </el-menu-item>
                <el-menu-item index="4-2">
                  <router-link to="/addHistory">新增历程</router-link>
                </el-menu-item>
              </el-submenu>
              <el-submenu index="5">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>产品方案</span>
                </template>
                <el-menu-item index="5-1">
                  <router-link to="/productMessage">产品信息</router-link>
                </el-menu-item>
                <el-menu-item index="5-2">
                  <router-link to="/addProduct">新增产品</router-link>
                </el-menu-item>
              </el-submenu>
              <el-submenu index="6">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>合作伙伴</span>
                </template>
                <el-menu-item index="6-1">
                  <router-link to="/buddy">伙伴信息</router-link>
                </el-menu-item>
                <el-menu-item index="6-2">
                  <router-link to="/addBuddy">新增伙伴</router-link>
                </el-menu-item>
              </el-submenu>
              <el-submenu index="7">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <router-link to="/about">关于我们</router-link>
                </template>
              </el-submenu>
              <el-submenu index="8">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>轮播图管理</span>
                </template>
                <el-menu-item index="8-1">
                  <router-link to="/swipperSetting">轮播图设置</router-link>
                </el-menu-item>
                <el-menu-item index="8-2">
                  <router-link to="/swipper">轮播图展示</router-link>
                </el-menu-item>
              </el-submenu>
            </el-menu>
          </el-aside>
          <el-main>
            <router-view></router-view>
          </el-main>
        </el-container>
      </el-container>
    </div>
</template>

<script>
    import headers from "@/components/home/herders.vue"
    import asides from "@/components/home/asides.vue"

    export default{
        components:{
            headers,
            asides,
        },
        data(){
          return {
            isCollapse:false
          }
        },
        methods:{
          sendColapse(val){
            this.isCollapse = val
          },
          handleOpen(key, keyPath) {
            console.log(key, keyPath);
          },
          handleClose(key, keyPath) {
            console.log(key, keyPath);
          }
        }
    }
</script>
<style scoped>
.el-submenu .el-menu-item{
  min-width: 150px !important;
}
  .el-header, .el-footer {
    background-color:#383F58;
    color: #fff;
    /* text-align: center; */
    line-height: 60px;
  }


  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    overflow: visible !important;
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }

  /* .el-header{
    width: 500px;
  } */
/* 
  .el-header{
    width: 500px !important;
  } */
  /* 样式穿透 */
  /* .el-container >>> .el-header{
    width: 500px;
  }
  .el-container /deep/ .el-header{
    width: 500px;
  } */
  /* :deep .el-header{
    width: 500px;
  } */
  .el-breadcrumb {
    margin-bottom: 15px;
  }
  .el-menu-item a{
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #333;
  }
  .el-submenu a{
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #333;
  }
  .el-aside{
    height: 100%;
  }
</style>